

class Solution:
    def jump(self, nums: 'List[int]', start=0) -> int:
        if len(nums) <= 1:
            return 0
        if start + nums[start] + 1 >= len(nums):
            return 1
        next_step = nums[start+1:nums[start] + start + 1]
        next_range = [i+x for i, x in enumerate(next_step)]
        mi = next_range.index(max(next_range))
        return 1 + self.jump(nums, start + mi + 1)

if __name__ == "__main__":
    s = Solution()
    print(s.jump([2,3,1,1,4]))
    print(s.jump([2,3,1,1,4,1,1,2,1,3]))